<template>
  <!-- 明细页面弹出框-->
  <el-dialog
    title="基础信息变更通知明细查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="true"
    @close="closeFn"
    append-to-body
  >
    <el-form ref="detailsForm" :model="formData" label-width="150px" :disabled="true">
      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="交易流水号：" prop="id">
            <el-input v-model="formData.id" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="报文标识号：" prop="pkgId">
            <el-input v-model="formData.pkgId" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="报文类型：" prop="pkgNo">
            <el-select v-model="formData.pkgNo" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.PKG_TYPE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="系统编号：" prop="sysCode">
            <el-select v-model="formData.sysCode" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.SYS_CODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="工作日期：" prop="workdate">
            <el-date-picker
              v-model="formData.workdate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="CPG日期：" prop="cpgDate">
            <el-date-picker
              v-model="formData.cpgDate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="发起参与机构：" prop="directSender">
            <el-input v-model="formData.directSender" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="接收参与机构：" prop="directRecver">
            <el-input v-model="formData.directRecver" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="变更期数：" prop="chgNum">
            <el-input v-model="formData.chgNum" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="变更记录数目：" prop="chgRcrdNum">
            <el-input v-model="formData.chgRcrdNum" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="行别变更数目：" prop="bankChgNum">
            <el-input v-model="formData.bankChgNum" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="CCPC代码变更数目：" prop="ccpcChgNum">
            <el-input v-model="formData.ccpcChgNum" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="城市代码变更数目：" prop="cityChgNum">
            <el-input v-model="formData.cityChgNum" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="基础数据种类：" prop="dataType">
            <el-select v-model="formData.dataType" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.BASEDATA_TYPE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="变更类型：" prop="chgType">
            <el-select v-model="formData.chgType" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.CHANGECODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="生效类型：" prop="effectType">
            <el-select v-model="formData.effectType" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.EFFECTIVECODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="生效日期：" prop="effectDate">
            <el-date-picker
              v-model="formData.effectDate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="失效日期：" prop="invalidDate">
            <el-date-picker
              v-model="formData.invalidDate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="行号：" prop="code">
            <el-input v-model="formData.code" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="行别名称：" prop="name">
            <el-input v-model="formData.name" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="类别代码：" prop="typecode">
            <el-select v-model="formData.typecode" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.TYPECODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="类别名称：" prop="typename">
            <el-input v-model="formData.typename" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="12">
          <el-form-item label="补发标志" prop="resndFlag">
            <el-select v-model="formData.resndFlag" placeholder="" style="width: 100%">
              <el-option
                v-for="dict in dictMap.RESND_FLAG_CODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="报文接收时间：" prop="rcvTime">
            <el-date-picker
              v-model="formData.rcvTime"
              type="datetime"
              value-format="yyyyMMddHHmmss"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="交易记录时间：" prop="txTime">
            <el-date-picker
              v-model="formData.txTime"
              type="datetime"
              value-format="yyyyMMddHHmmss"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="最后一次状态变更时间：" prop="statTime">
            <el-date-picker
              v-model="formData.statTime"
              type="datetime"
              value-format="yyyyMMddHHmmss"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="备注：" prop="remarks">
            <el-input type="textarea" v-model="formData.remarks" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="closeFn">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
export default {
  name: "basisChangeInnerDetails",
  components: {},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      code: "",
      name: "",
      typename: "",
      typecode: "",
      // 是否显示弹出层
      open: false,
    };
  },
  mounted() {},
  watch: {},
  methods: {
    // 表单重置
    reset() {
      this.resetForm("logForm");
    },
    closeFn() {
      this.open = false;
    },
    show() {
      // if (this.formData.dataType === '1') {
      //   this.code = "行号：";
      //   this.name = "行别名称：";
      //   this.typecode = "类别代码：";
      //   this.typename = "类别名称：";
      // } else if (this.formData.dataType === '2') {
      //   this.code = "节点代码：";
      //   this.name = "节点名称：";
      //   this.typecode = "所在城市代码：";
      //   this.typename = "参与机构：";
      // }  else {
      //   this.code = "城市代码：";
      //   this.name = "城市名称：";
      //   this.typecode = "城市类型：";
      //   this.typename = "节点代码：";
      // }
      this.open = true;
    },
    cancel() {
      this.open = false;
      this.reset();
    },
  },
};
</script>
